/**
 * Copyright (C)  2011  chen wei hua.
 * Permission is granted to copy, distribute and/or modify this document
 * under the terms of the GNU Free Documentation License, Version 2.0
 * or any later version published by the Free Software Foundation;
 * with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
 * A copy of the license is included in the section entitled "GNU Free Documentation License".
 */
package com.javaeye.accounting.dao;

import java.util.List;

import com.javaeye.common.dao.DAO;
import com.javaeye.accounting.dto.MaterialsMonthBatchDetail;

public interface MaterialsMonthBatchDetailDAO extends DAO {
	
	public void removeDetail(int materialsId);
	
	public void saveMaterialsMonthBatchDetail(MaterialsMonthBatchDetail detail);
	
	/**
	 * 取得对应月度的物料库存月报信息
	 * @param materialsId
	 * @param monthNo
	 * @return
	 */
	public long getMonthInfoCount(String monthNo);
	
	/**
	 * 取得对应月度的物料库存月报信息
	 * @param monthNo
	 * @param categoryId
	 * @return
	 */
	public List<MaterialsMonthBatchDetail> getMonthInfoByChildCategory(final String monthNo, final int categoryId);
	
	/**
	 * 取得对应月度的物料库存月报信息
	 * @param monthNo
	 * @param categoryId
	 * @return
	 */
	public List<MaterialsMonthBatchDetail> getMonthInfo(String monthNo, int categoryId, String queryType);
	
	/**
	 * 取得对应月度的物料库存月报信息
	 * @param monthNo
	 * @param skuId
	 * @return
	 */
	public List<MaterialsMonthBatchDetail> getMonthInfo(String monthNo, int skuId);
	
	/**
	 * 取得对应月度的物料数量>0的所有批次
	 * @param materialsId
	 * @param monthNo
	 * @return
	 */
	public List<String> getBatchNos(int materialsId, String monthNo);
	
	/**
	 * 取得对应月度和批次的物料库存信息
	 * @param materialsId
	 * @param monthNo
	 * @return
	 */
	public MaterialsMonthBatchDetail getMaterialsMonthBatchDetail(int materialsId, String batchNo, String monthNo);
	
	
	/**
	 * 根据明细Id取得月度明细记录
	 * @param detailId
	 * @return
	 */
	public MaterialsMonthBatchDetail getMaterialsMonthBatchDetail(int detailId);
	
	/**
	 * 取得对应月度的物料库存信息
	 * @param materialsId
	 * @param monthNo
	 * @return
	 */
	public List<MaterialsMonthBatchDetail> getMaterialsMonthBatchDetail(int materialsId, String monthNo);
	
	/**
	 * 取得对应月度的物料数量>0的物料ID
	 * @param materialsId
	 * @param monthNo
	 * @return
	 */
	public List<Integer> getMaterialsIds(String monthNo);
}
